92969: Add "expand" button overlay to charts for full-screen mode#95249
92969: Add "expand" button overlay to charts for full-screen mode#95249abbasifaizan70 wants to merge 16 commits into
Conversation
|
Hey, I noticed you changed If you want to automatically generate translations for other locales, an Expensify employee will have to:
Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running: npx ts-node ./scripts/generateTranslations.ts --helpTypically, you'd want to translate only what you changed by running |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bb9bb9f384
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
cc @Expensify/design this button doesn't look right to me at all. Can we use one of our standard icon buttons here? (fully circle, smaller icon, etc.) |
|
Totally agree. Please use our standard icon buttons, use a small 28x28 icon and it should probably be like 12px from the top and 12px from the right? |
|
@situchan I fixed above AI feedbacks. |
|
Much better. @shawnborton do you think we should only show that icon on hover? Basically exactly what we do for receipts? CleanShot.2026-07-06.at.11.28.54.mp4 |
|
Yup, that makes sense to me! Or we always show a three dots icon in the top right but I don't think that will look good based on how these things scale on mobile devices. Also, does clicking anywhere on the chart also expand it? Or just this button does? |
|
@luacmartins Update the button design and show on hover. |
|
@abbasifaizan70 is this ready for review? |
|
@luacmartins yes, as per new requirements. |
|
@situchan could you please review? |
|
@situchan did you get a chance to review this yet? |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
🤖 Code review — overall the approach is clean: reusing 🔴 Background color isn't theme-resolved in the modal (dark-mode mismatch)The inline chart resolves its background through the chart theme map before painting it: 🟡 Polar charts won't render "identical, only larger"Inline, polar charts are clipped to 🟡 Redundant
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 159724af2f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
🤖 Potential regressions to existing chart rendering that aren't called out in the PR's test steps or my earlier review. I can't run the app from here, so these are code-level risks to verify — ordered by likely impact. 1. Every inline chart now permanently mounts a full
|
|
Please check ^ |
… clipping, lazy modal mount, hover perf
|
@situchan Addressed all points:
|
|
Let us know when there are new screenshots/videos to review. |
video.mov |
|
Can you expand the chart by simply tapping on it? That might be nice for mobile. When the chart is expanded in the attachment modal, can you zoom in? Again, that might be nice for mobile. |
Zoom feature not implemented yet. |
|
Sure, let's do that in a separate PR. |
|
@abbasifaizan70 please merge main |
|
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5d81dfb060
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@situchan Updated with latest main and fixed CI/CD as well. |
|
🤖 Re-reviewed at 🟡 Fluid charts lose their container background/rounding when expandedFor a chart without numeric design dimensions, the inline path still routes through 🟢 Scale is measured against the padded box, so
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: aa02f48baa
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| <VictoryChartExpandButton | ||
| onPress={openModal} | ||
| shouldShow={hovered || !deviceHasHoverSupport} | ||
| /> |
There was a problem hiding this comment.
Keep the expand action visible on touch-capable hover devices
On web devices that support both touch and a fine hover pointer (for example, an iPad with a trackpad or a touchscreen laptop), hasHoverSupport() is true, so this hides the button until a mouse hover occurs. A user interacting by touch cannot trigger that hover state and therefore has no way to open the expanded chart. Use touch capability in the visibility condition instead of treating hover support as mutually exclusive with touch.
Useful? React with 👍 / 👎.
|
🤖 Regression scan at 🟡 Verify: expand-button placement on wide native surfaces (tablet/iPad)The button is absolutely positioned ( 🟢 Intentional but note: button now overlays the top-right of every existing chart on touch
Cleared as NOT regressions (with evidence)
This is an automated regression scan — treat findings as risks to verify, not confirmed bugs. Reply with |
Explanation of Change
Adds an expand button overlaid on the top-right corner of inline charts, which opens the chart in a centered full-screen modal. The modal reuses the already-parsed chart data and renders it scaled to the viewport, so the expanded chart matches the inline one exactly, just larger.
Fixed Issues
$ #92969
PROPOSAL: #92969 (comment)
Tests
Offline tests
same as tests.
QA Steps
same as tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)Avatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Screen.Recording.2026-07-07.at.2.33.29.AM.mov
Android: mWeb Chrome
iOS: Native
Screen.Recording.2026-07-07.at.2.36.43.AM.mov
iOS: mWeb Safari
Screen.Recording.2026-07-07.at.2.37.58.AM.mov
MacOS: Chrome / Safari
Screen.Recording.2026-07-07.at.2.29.33.AM.mov